package com.ruoyi.hov.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.dynamic.DynamicQueryServiceImpl;
import com.ruoyi.hov.entity.HovDtl;
import com.ruoyi.hov.mapper.HovDtlMapper;
import com.ruoyi.hov.service.HovDtlService;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * hov细表 服务实现类
 * </p>
 *
 * @author XiaShiLong
 * @since 2021-04-01
 */
@Service
public class HovDtlServiceImpl extends DynamicQueryServiceImpl<HovDtlMapper, HovDtl> implements HovDtlService {

    /**
     * 根据hovId 删除
     *
     * @param hovId hovId
     * @return boolean
     */
    @Override
    public boolean deleteByHovId(Serializable hovId) {
        return this.remove(Wrappers.<HovDtl>lambdaQuery().eq(HovDtl::getHovId, hovId));
    }

    /**
     * 根据hovId获取所有
     *
     * @param hovId hovId
     * @return List
     */
    @Override
    public List<HovDtl> getByHovId(Long hovId) {
        return this.getBaseMapper().getByHovId(hovId);
    }
}
